<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>评论列表</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="../../Res/LayUI/css/layui.css" media="all">
<script type="text/javascript" src="../../js/jquery-1.10.2.js"></script>
<script src="../../Res/LayUI/layui.js" charset="utf-8"></script>
	<script>
		layui.use('table', function() {
			var table = layui.table;
			//监听表格复选框选择
			table.on('checkbox(demo)', function(obj) {
				console.log(obj)
			});
			
			$('.demoTable .layui-btn').on('click', function() {
				var type = $(this).data('type');
				active[type] ? active[type].call(this) : '';
			});
		});
	</script>
<style type="text/css">
img{
	width:40px;
	height: 40px;
}
.invisible {
  height: .5rem;
  top: .7rem;
}
.visible {
  height: .8rem;
  top: .55rem;
}
</style>
</head>
<body>
	<table class="layui-table"
		lay-data="{width: 790,url:'../../commentAction/showAjax', page:true, id:'idTest'}"
		lay-filter="demo">
		<thead>
			<tr>
				<th lay-data="{type:'checkbox', fixed: 'left'}"></th>
				<th lay-data="{field:'content', width:200, align:'center'}">评论内容</th>
				<th lay-data="{field:'comTime', width:330, align:'center'}">评论时间</th>
				<th lay-data="{field:'userName', width:205, align:'center'}">用户姓名</th>
			</tr>
		</thead>
	</table>
</body>
</html>